﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ArtOfTest.WebAii.Silverlight.UI;

namespace SM2DashBoard
{
    public class DashboardDialog
    {
        public static void create()
        {
            SM2Input.Silverlight.ClickButton("OKButton");
        }

        public static void close()
        {
            SM2Input.Silverlight.ClickButton("CancelButton");
        }

        public static Boolean verifyDashboardDialogDisplay()
        {
            try
            {
                IList<TextBlock> iListTB = Utilities.GlobalObject.SILVERLIGHTAPP.Find.AllByType<TextBlock>();
                int intiListTB = iListTB.Count;
                for (int i = 0; i < intiListTB; i++)
                {
                    TextBlock TB = iListTB[i];
                    string str = TB.Text.ToString();
                    if (str.Equals("Welcome to Dashboards"))
                    {
                        return true;
                    }
                }
            }
            catch { return false; }
            return false;
        }
    }
}
